Skip to content

fix(security): remove leaked token from settings.py#1319

Merged
qin-ctx merged 1 commit intovolcengine:mainfrom
kaisongli:fix/token-leak
Apr 9, 2026
Merged

fix(security): remove leaked token from settings.py#1319
qin-ctx merged 1 commit intovolcengine:mainfrom
kaisongli:fix/token-leak

Conversation

@kaisongli
Copy link
Copy Markdown
Collaborator

  • Remove tests/oc2ov_test/config/settings.py containing exposed auth token
  • Add settings.py to .gitignore to prevent future leaks
  • Users should copy settings.example.py to settings.py and fill in their own tokens

Description

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

- Remove tests/oc2ov_test/config/settings.py containing exposed auth token
- Add settings.py to .gitignore to prevent future leaks
- Users should copy settings.example.py to settings.py and fill in their own tokens
@qin-ctx qin-ctx merged commit 006593f into volcengine:main Apr 9, 2026
4 of 8 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Apr 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🏅 Score: 90
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

zeattacker pushed a commit to zeattacker/OpenViking that referenced this pull request Apr 10, 2026
Upstream catch-up from volcengine/OpenViking main at a18d4b9.

Auto-merged (24 files): README, bot/config, crates/ov_cli, session/session.py,
session/compressor{,_v2}.py, session/memory_deduplicator.py, memory_extractor.py,
schema_model_generator.py, utils/uri.py, storage/viking_fs.py,
storage/transaction/lock_manager.py, storage/queuefs/semantic_processor.py,
retrieve/hierarchical_retriever.py, server/routers/content.py, server/routers/search.py,
core/directories.py, prompts/templates/memory/preferences.yaml,
examples/openclaw-plugin/{index,text-utils}.ts, examples/ov.conf.example,
openviking_cli/utils/config/{memory_config,open_viking_config}.py,
docs/en/concepts/08-session.md.

Hand-resolved conflicts (14 files):

Memory subsystem:
- entities.yaml: adopt upstream category field + event linking, keep our
  brain-hardening rules (canonical names, Aliases section, one-card-per-entity).
  Removed upstream's Caroline LoCoMo leak.
- events.yaml: adopt upstream year/month/day folder template.
- memory_updater.py: keep dev's two-function _apply_write/_apply_edit structure
  with collision-safe entity writes, port get_year/get_month/get_day helpers
  to ExtractContext for events.yaml template to work.
- session_extract_context_provider.py: keep dev's [Keywords] bug fix
  (_derive_search_keywords) — upstream volcengine#1159 did not address this.
- extract_loop.py: keep dev's small-model extraction path. Dev's hard_cap
  iteration extension is more sophisticated than upstream's version.

Storage:
- collection_schemas.py: combine dev's BGE-M3 truncation (30k chars) with
  upstream volcengine#1301 embed_compat async wrapper.
- queuefs/semantic_dag.py: combine dev's old_summary hash comparison with
  upstream's defensive null check on cached summary.
- queuefs/semantic_queue.py: keep dev's 300-second dedup window with
  _TrackedSemanticRequest dataclass.
- utils/summarizer.py: take upstream — convergent fix, upstream is superset
  of our context_type centralization plus resource cover handling.

Models:
- openai_vlm.py: merge timeout signature (float | None = 60.0).

Plugin (TypeScript):
- config.ts: keep dev's profileInjection/recallFormat/alignment fields,
  add upstream's bypassSessionPatterns deprecation alias.
- client.ts: merge addSessionMessage signature
  (sessionId, role, content, parts?, agentId?, createdAt?), keep dev's
  createSession(), combine body building with optional created_at.
- context-engine.ts: keep dev's driftDetector + alignment, add upstream's
  isBypassedSession helper + bypass early-return in doCommit/afterTurn.
  Drop upstream's inline afterTurn commit block — dev routes through
  doCommitOVSession. Update addSessionMessage call to 6-arg form.
- memory-ranking.ts: keep dev's multi-slot recall + tool-experience
  separation architecture.

Deferred upstream changes:
- volcengine#1221 agfs→ragfs Rust rewrite: new Rust crates land but Python code
  unchanged; pyagfs handles auto-fallback via RAGFS_IMPL env var.
- volcengine#1159 memory_updater unified operations refactor: kept dev's separate
  write/edit function structure to avoid cascading schema changes through
  extract_loop and related files.

Critical security + bug fixes preserved from upstream:
- volcengine#1319 leaked token removed from settings.py
- volcengine#1133 SSRF hardening on HTTP resource ingestion
- volcengine#1297 sanitize and cap recall queries (wraps our plugin recall)
- volcengine#1277 configurable embedding circuit breaker
- volcengine#1279 trusted mode without API key restricted to localhost
- volcengine#1211 PID lock recycle + ownership checks + compressor refs
- volcengine#1182 task API ownership leakage fix in content.py
- volcengine#1301 embedder async contention reduction
- volcengine#1226 prevent VLM blocking startup hang in redo recovery
- volcengine#769/volcengine#792 queuefs dedupe memory semantic parent enqueues

Critical dev fixes preserved:
- [Keywords] placeholder root-cause fix (brain-hardening plan phase 1)
- Episodic memory v2 (retrieval scope, category boosts, archive filter)
- Qwen-9B small-model extraction compatibility
- Plugin recall refactor (tool-experience separation, multi-tier recall)
- Context-type centralized inference (convergent with upstream fix)
- BGE-M3 embedding input truncation
- URI normalization + collision-safe entity writes

Merged on dev-local2 safety branch. Next steps: build + test before
fast-forwarding dev.

Co-Authored-By: claude-flow <ruv@ruv.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants